package com.mengma.ec.dao;

import com.mengma.ec.entity.Order;
import com.mengma.ec.entity.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderItemMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(OrderItem record);

    int insertSelective(OrderItem record);

    OrderItem selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OrderItem record);

    int updateByPrimaryKey(OrderItem record);

    int batchInsert(@Param("orderItemList") List<OrderItem> orderItemList);

    List<OrderItem> selectByUserId(@Param("id") Integer id);

    List<OrderItem> selectByOrderNo(Long orderNo);

    List<OrderItem> findByUserIdAndOrderNo(@Param("id") Integer id, @Param("orderNo") Long orderNo);

    List<Order> selectAllOrder();

    OrderItem findByOrderNo(Long orderNo);
}